package test.tradeflow;

import test.rsp.BaseRspDTO;


import java.util.HashMap;
import java.util.Map;

/**
 * 交易处理上下文
 *
 * @time 2020/12/20 17:14
 */
public class TradeContext<R,  T> {

    private R reqMsg;
    private T rspMsg;
    private Map<String, Object> tempCtx = new HashMap<>();

    public R getReqMsg() {
        return reqMsg;
    }

    public void setReqMsg(R reqMsg) {
        this.reqMsg = reqMsg;
    }

    public T getRspMsg() {
        return rspMsg;
    }

    public void setRspMsg(T rspMsg) {
        this.rspMsg = rspMsg;
    }

    public Map<String, Object> getTempCtx() {
        return tempCtx;
    }

    public void setTempCtx(Map<String, Object> tempCtx) {
        this.tempCtx = tempCtx;
    }

    @Override
    public String toString() {
        return "TradeContext{" +
                "reqMsg=" + reqMsg +
                ", rspMsg=" + rspMsg +
                ", tempCtx=" + tempCtx +
                '}';
    }
}
